﻿using System.Collections.Generic;
using System.Linq;
using KLS.PPDS.Core.Entity;
using KLS.PPDS.Data.Database.Repository.EntityRepository;

namespace KLS.PPDS.ApplicationService.Manager
{
    public class LanguageManager : RepositoryManager<LanguageRepository>
    {
        static public List<Language> GetAll()
        {
          return  Repository.FindAll().OrderBy(x=>x.Name).ToList();
        }
        static public Language Get(int id)
        {
            return Repository.FindOne(id);
        }
        static public Language Get(string code)
        {
            return Repository.GetByCode(code);
        }
    }
}
